local skel = fk.CreateSkill {
  name = "efengqi__dimeng_active",
}

skel:addEffect("active", {
  card_num = 0,
  target_num = 2,
  card_filter = Util.FalseFunc,
  target_tip = function (self, player, to, selected, selected_cards, card, selectable, extra_data)
    if #selected == 0 and selectable then
      local num = 6 - to:getHandcardNum()
      if table.find(Fk:currentRoom().alive_players, function (p)
        return p ~= to and p:getHandcardNum() == num
      end) then
        return "@efengqi__dimeng:::"..num
      end
    end
  end,
  target_filter = function (self, player, to, selected)
    if to:getHandcardNum() > 6 then return false end
    if #selected < 2 then
      if #selected == 0 then return true end
      local first = selected[1]
      return to:getHandcardNum() + first:getHandcardNum() == 6
    end
  end,
})



return skel
